<script type="text/javascript">
    function TyxxcjszManagerCtrl($scope, $http, modalService, CtrlUtil, $element, UploadService) {
        var ctrl = this
        CtrlUtil.build(ctrl, ':root/tyxxcjsz/query')
        this.query = function () {
            $http.post(':root/tyxxcjsz/query').success(function (r) {
                ctrl.entity = r;
                ctrl.oldEntity = r;
            })
        }
        this.cancel = function () {
            ctrl.entity = ctrl.oldEntity;
        }
        this.confirm = function(){
            $http.post(':root/tyxxcjsz/edit', this.entity).success(function (r) {
                modalService.succ('更新成功', 1500)
                ctrl.query()
            })
        }
    }

</script>
<div ng-controller="TyxxcjszManagerCtrl as ctrl" ng-init="ctrl.query()">
    <div class="panel-body">
        <form class="form-horizontal">
            <div class="row">
                <div class="form-group">
                    <label class="col-md-2 control-label">开始时间:</label>
                    <div class="col-md-4">
                        <input ng-model="ctrl.entity.ksrq" name="ctrl.entity.ksrq" datetimepicker placeholder="请输入采集开始时间" title="请输入采集开始时间"
                               type="text" class="form-control">
                    </div>
                    <label class="col-md-2 control-label">截止时间:</label>
                    <div class="col-md-4 radio">
                        <input ng-model="ctrl.entity.jzrq" name="ctrl.entity.jzrq" datetimepicker placeholder="请输入采集截止时间" title="请输入采集截止时间"
                               type="text" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">修改人:</label>
                    <div class="col-md-4">
                        <input ng-model="ctrl.entity.xgr" name="ctrl.entity.xgr" readonly="true" placeholder="请输入修改人" title="请输入修改人"
                               type="text" class="form-control">
                    </div>
                    <label class="col-md-2 control-label">修改时间:</label>
                    <div class="col-md-4 radio">
                        <input ng-model="ctrl.entity.xgsj" name="ctrl.entity.xgsj" readonly="true" datetimepicker placeholder="请输入修改时间" title="请输入修改时间"
                               type="text" class="form-control">
                    </div>
                </div>
                <div class="form-group ">
                    <div class="col-md-12 text-center">
                        <button type="button" class="btn btn-default" ng-click="ctrl.cancel()">
                            <span class="glyphicon glyphicon-remove"></span>
                            取消
                        </button>
                        <button type="button" class="btn btn-cys margin-left" ng-click="ctrl.confirm()">
                            <span class="glyphicon glyphicon-ok"></span>
                            确定
                        </button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>